
set more off
sort ccode year
*Web Appendix A 
*Descriptive statistics
*Country Name & Time Period in Dataset
list countryname year if year >1949 & year <2008

*Variable Mean Std Dev Min Max
sum IMR  cwmjrgled1608  interstatewarmidb31608 majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 crc popchangepwtpercent loggdppcpwt democautoc percapitaschoolenrollment tropical if year>1949 & year<2008

*VIF test
collin IMR  cwmjrgled1608  interstatewarmidb31608 majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 crc popchangepwtpercent loggdppcpwt democautoc percapitaschoolenrollment tropical if year>1949 & year<2008

*Web Appendix B: Pairwise correlations 
pwcorr IMR  cwmjrgled1608  interstatewarmidb31608 majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 crc popchangepwtpercent loggdppcpwt democautoc percapitaschoolenrollment tropical if year>1949 & year<2008

*Table 2
/*GLM: Short-term Association Models 1950-2007*/

set more off
xtset ccode year
glm IMR l.cwmjrgled1608 l.crc l.popchangepwtpercent l.loggdppcpwt  l.democautoc  l.percapitaschoolenrollment tropical i.year c2-c990 if year>1949 & year<2008 , link(log) vce(robust) eform
outreg2 using table2, label dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) replace 
set more off
xtset ccode year
glm IMR l.interstatewarmidb31608 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc  l.percapitaschoolenrollment tropical i.year c2-c990 if year>1949 & year<2008 , link(log) vce(robust) eform
outreg2 using table2, label dec(3) onecol word stats(coef se)stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) append
set more off
xtset ccode year
glm IMR l.cwmjrgled1608 l.interstatewarmidb31608 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc  l.percapitaschoolenrollment tropical i.year c2-c990 if year>1949 & year<2008 , link(log) vce(robust) eform
outreg2 using table2, label dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) append
margins, at (l.cwmjrgled1608=(0(1)1))
margins, at (l.interstatewarmidb31608=(0(1)1))
margins, dydx(*) post
coefplot,xline(0) msize(tiny) coeflabels(l.cwmjrgled1608 = "Incidence of civil war" l.interstatewarmidb31608 = "Incidence of interstate war" l.crc = "Ratified CRC" l.popchangepwtpercent = "Population change"  l.loggdppcpwt  = "Level of development" l.democautoc = "Level of democracy" l.percapitaschoolenrollment = "Level of educational enrollment"  tropical = "Tropical region" year = "Year") xtitle(Change in infant mortality rates)  title(Figure 1 Association of civil and interstate war on changes infant mortality rates, size(vsmall))  drop(_cons c2 c20 c31 c40 c41 c42 c51 c52 c53 c54 c55 c56 c57 c58 c60 c70 c80 c90 c91 c92 c93 c94 c95 c100 c101 c110 c115 c130 c135 c140 c145 c150 c155 c160 c165 c200 c205 c210 c211 c212 c220 c223 c225 c230 c232 c235 c255 c290 c305 c310 c316 c317 c325 c331 c338 c339 c343 c344 c345 c346 c349 c350 c352 c355 c359 c360 c365 c366 c367 c368 c369 c370 c371 c372 c373 c375 c380 c385 c390 c395 c402 c403 c404 c411 c420 c432 c433 c434 c435 c436 c437 c438 c439 c450 c451 c452 c461 c471 c475 c481 c482 c483 c484 c490 c500 c501 c510 c516 c517 c520 c522 c530 c531 c540 c541 c551 c552 c553 c560 c565 c570 c571 c572 c580 c581 c590 c591 c600 c615 c616 c620 c625 c630 c640 c645 c651 c652 c660 c663 c666 c670 c679 c690 c692 c694 c696 c698 c700 c701 c702 c703 c704 c705 c710 c712 c713 c731 c732 c740 c750 c760 c770 c771 c775 c780 c781 c790 c800 c811 c812 c816 c820 c830 c835 c840 c850 c900 c910 c920 c935 c940 c946 c950 c955 c970 c983 c986 c987 c990 *.year)
graph save "~/IncidenceCoefficientPlot", replace



/*GLM: Cumulative Association Models 1950-2007*/
set more off
xtset ccode year
glm IMR  majorcwpcntime1862008lag2 l.crc l.popchangepwtpercent  l.loggdppcpwt  l.democautoc  l.percapitaschoolenrollment tropical majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990 if year>1949 & year<2008, link(log) vce(robust) eform
outreg2 using table2, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) append
set more off
xtset ccode year
glm IMR  interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 i.year c2-c990 if year>1949 & year<2008, link(log) vce(robust) eform
outreg2 using table2, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) append
set more off
xtset ccode year
glm IMR majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990 if year>1949 & year<2008, link(log) vce(robust) eform
outreg2 using table2, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) append
set more off
xtset ccode year
glm IMR l.cwmjrgled1608 l.interstatewarmidb31608 majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt  l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990 if year>1949 & year<2008, link(log) vce(robust) eform
outreg2 using table2, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Table 2: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, GLM Model Two Way Fixed Effects) append
margins, at(majorcwpcntime1862008lag2=(0(5)100)) post
estimates store civilwarmargins
coefplot civilwarmargins, at xtitle(Proportion of time spent in major civil war , size(vsmall)) yscale(range(60 75)) ytitle(Infant mortality rate, size(vsmall)) title(Figure 2 Cumulative association of major civil war on infant mortality rates, size(vsmall))
graph save "~/JHRigure2", replace

set more off
xtset ccode year
glm IMR l.cwmjrgled1608 l.interstatewarmidb31608 majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt  l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990 if year>1949 & year<2008, link(log) vce(robust) eform
margins, at(interstatewrpcnttime18162008lag2=(0(5)80)) post
estimates store interstatewarmargins
coefplot interstatewarmargins, at  xtitle(Proportion of time spent in major interstate war, size(vsmall)) yscale(range(60 130)) ytitle(Infant mortality rate, size(vsmall)) title(Figure 3 Cumulative association of major interstate war on infant mortality rates, size(vsmall))
graph save "~/JHRigure3", replace

*Web Appendix C
/*Robustness Tests: Error Correction Model, Short-term Association Models 1950-2007*/
set more off
xtset ccode year
reg d.IMR l.IMR   d.cwmjrgled1608 l.cwmjrgled1608 d.crc l.crc  d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc  d.percapitaschoolenrollment l.percapitaschoolenrollment tropical if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Web Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) replace 
set more off
xtset ccode year
reg d.IMR l.IMR   d.interstatewarmidb31608 l.interstatewarmidb31608 d.crc l.crc  d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc  d.percapitaschoolenrollment l.percapitaschoolenrollment tropical if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Web Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) append
set more off
xtset ccode year
reg d.IMR l.IMR  d.cwmjrgled1608 l.cwmjrgled1608 d.interstatewarmidb31608 l.interstatewarmidb31608 d.crc l.crc  d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc  d.percapitaschoolenrollment l.percapitaschoolenrollment tropical if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(TWeb Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) append


/*Error Correction Model, Cumulative Association Models Including ICCPR Convention 1950-2007*/
set more off
xtset ccode year
reg d.IMR l.IMR d.majorcwpcntime1862008lag2 majorcwpcntime1862008lag2 d.crc l.crc  d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc d.percapitaschoolenrollment l.percapitaschoolenrollment tropical majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Web Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) append
set more off
xtset ccode year
reg d.IMR l.IMR d.interstatewrpcnttime18162008lag2 interstatewrpcnttime18162008lag2 d.crc l.crc  d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc d.percapitaschoolenrollment l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Web Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) append

set more off
xtset ccode year
reg d.IMR l.IMR  d.majorcwpcntime1862008lag2 majorcwpcntime1862008lag2 d.interstatewrpcnttime18162008lag2 interstatewrpcnttime18162008lag2  d.crc l.crc d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc d.percapitaschoolenrollment l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Web Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) append

set more off
xtset ccode year
reg d.IMR l.IMR  d.cwmjrgled1608 l.cwmjrgled1608 d.interstatewarmidb31608 l.interstatewarmidb31608 d.majorcwpcntime1862008lag2 majorcwpcntime1862008lag2 d.interstatewrpcnttime18162008lag2 interstatewrpcnttime18162008lag2  d.crc l.crc d.popchangepwtpercent l.popchangepwtpercent d.loggdppcpwt l.loggdppcpwt  d.democautoc l.democautoc d.percapitaschoolenrollment l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 if year>1949 & year<2008 
outreg2 using webappendixc, dec(3) onecol word stats(coef se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Web Appendix C: Error Correction Model, Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries) append

*Web Appendix D
/*Heckman 1950-2007*/
/*Short-term Association Models */

set more off
heckman logimr l.cwmjrgled1608 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc  l.percapitaschoolenrollment tropical i.year c2-c990, select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode)
outreg2 using appendixd, label dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) replace

set more off
heckman logimr l.interstatewarmidb31608 l.crc l.popchangepwtpercent l.loggdppcpwt  l.democautoc  l.percapitaschoolenrollment tropical i.year c2-c990, select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode)
outreg2 using appendixd, label dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) append

set more off
heckman logimr l.cwmjrgled1608 l.interstatewarmidb31608 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc  l.percapitaschoolenrollment tropical i.year c2-c990, select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode)
outreg2 using appendixd, label dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Short-term Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) append


/*Heckman 1950-2007*/
/*Cumulative Association Models*/

set more off
heckman logimr majorcwpcntime1862008lag2 l.crc l.popchangepwtpercent  l.loggdppcpwt  l.democautoc  l.percapitaschoolenrollment tropical majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990,  select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode) 
outreg2 using  appendixd, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) append

set more off
heckman logimr interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt  l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 i.year c2-c990,  select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode) 
outreg2 using appendixd, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) append

set more off
heckman logimr majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt  l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990,  select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode) 
outreg2 using appendixd, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) append

set more off
heckman logimr l.cwmjrgled1608 l.interstatewarmidb31608 majorcwpcntime1862008lag2 interstatewrpcnttime18162008lag2 l.crc l.popchangepwtpercent l.loggdppcpwt   l.democautoc l.percapitaschoolenrollment tropical interstatepeaceyrs interstate_spline1 interstate_spline2 interstate_spline3 majorcivilwarpeaceyrs majorcivilwar_spline1 majorcivilwar_spline2 majorcivilwar_spline3 i.year c2-c990,  select(imrdummy  = numberofconflict18162008 numberofconflict18162008lag1) robust cluster(ccode) 
outreg2 using appendixd, dec(3) onecol word stats(coef se) stnum(replace coef=exp(coef), replace se=coef*se) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, ^) ct(Cumulative Association) ti(Appendix D: Association of Civil and Interstate War on Infant Mortality 1950-2007, All Countries, Heckman Selection Model Two Way Fixed Effects) append

